<?php
/**
 * User: Lijun
 * Date: 2017/6/2
 * Comment: 自定义函数
 */
//打印函数，用于调试
function p($a){
    echo "<pre>";
    print_r($a);
}

//时间戳返回星期几
function getTimeWeek($time, $i = 0) {
  $weekarray = array("一", "二", "三", "四", "五", "六", "日");
  $oneD = 24 * 60 * 60;
  return "星期" . $weekarray[date("w", $time + $oneD * $i)];
}
